package com.yogee.topseller.activity;

import android.os.Bundle;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.yogee.core.base.HttpActivity;
import com.yogee.topseller.R;
import com.yogee.topseller.utils.AppUtil;

import java.util.Random;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 通用的webview,入口有费用商议，地址查询
 *
 * @author hanyu
 *         created by 2017/7/20 9:38
 */

public class CommonWebView extends HttpActivity {
    
    @BindView(R.id.title_white_left_back)
    LinearLayout titleWhiteLeftBack;
    @BindView(R.id.title_white_title)
    TextView titleWhiteTitle;
    @BindView(R.id.tv_txt)
    TextView tvTxt;
    private String titleString;
    
    @Override
    protected int getLayoutId() {
        return R.layout.common_webview;
    }

    @Override
    protected void initView() {
        if (null != getIntent()){
            titleString = getIntent().getStringExtra("title");
        }
        titleWhiteTitle.setText(titleString);
        if ("费用商议".equals(titleString)){
            tvTxt.setText(getResources().getString(R.string.price_term));
        }else if ("地址查询".equals(titleString)){
            tvTxt.setText(getResources().getString(R.string.address_term));
        }
    }

    @OnClick(R.id.title_white_left_back)
    public void onViewClicked() {
        if (AppUtil.isFastDoubleClick(500)){
            
            return;
        }
        finish();
    }
}
